<%@ page language="java"  pageEncoding="utf-8" contentType="text/html; charset=utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>编辑菜单</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<LINK href="resource/css/admin.css" type="text/css" rel="stylesheet">
    <script type="text/javascript">
         function  editcheck(){
             String.prototype.trim=function(){
                  return this.replace(/(^\s*)|(\s*$)/g, "");
              }
             var  menuName=document.getElementById("menuName").value;
             var  menuNamevale=menuName.trim();
             if(menuNamevale==""){
                 alert("请填写菜单名");
                 return false;
             }
             if(menuNamevale.length<2 || menuNamevale.length>10 ){
                 alert("菜单名的长度应大于2 小于10");
                 return false;
             }
             var menuUrl=document.getElementById("menuUrl").value;
             var menuUrlvalue=menuUrl.trim();
              if(menuUrlvalue==""){
                 alert("请填写菜单路径长度");
                 return false;
             }
             return true;
         }
    
    </script>
  </head>
  
  <body>
        <div align="center"><form name="editcheck"  action="<%=basePath%>tree/editMenu.shtml" method="post" onsubmit="return editcheck()"><table>
            <br><input type="hidden" name="id" value="${menu.id}"/>
            <tr><td>菜单名:</td><td><input type="text" id="menuName" name="menuName" value="${menu.menuName}"></td></tr>
            <tr><td>菜单路径:</td><td><input type="text" id="menuUrl" name="menuUrl" value="${menu.menuUrl}"></td></tr>
            <tr><td>菜单说明</td><td><textarea rows="12" cols="20" name="menuDescribe">${menu.menuDescribe}</textarea> </td>    </tr>
            <tr ><td colspan="2" align="center"><input  type="submit" value="修改">&nbsp;&nbsp;<input  type="reset" value="重置"></td>    </tr>
        </table></form></div>
  </body>
</html>
